package org.dromara.pay.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import org.dromara.starter.jpacomment.annotation.SailColumn;
import org.dromara.starter.jpacomment.annotation.SailIndex;
import org.dromara.starter.jpacomment.annotation.SailTable;
import org.dromara.starter.jpacomment.enums.IndexType;
/**
 * 支付宝订单信息对象 pay_alipay_orders_sign
 *
 * @author yf
 * @date 2024-07-22
 */

@Data
@TableName("pay_alipay_orders_sign")
@Entity
@Table(name = "pay_alipay_orders_sign")
@SailTable(comment = "支付宝订单信息表", indexs = {})
public class PayAlipayOrdersSign implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    public static final String TRANS_ID_TO_OBJECT = "pay_alipay_orders_sign_id_to_object";
    /**
     * 支付订单验签id
     */
    @TableId(value = "alipay_id")
    @Id
    private String alipayId;
    /**
     * 商户订单号
     */
    @SailColumn(comment = "商户订单号",type = "int", defaultValue = "NULL")
    @Column(name = "activity_order_id")
    private Integer activityOrderId;
    /**
     * 支付宝交易凭证号
     */
    @Column(name = "alipay_no")
    @SailColumn(comment = "支付宝交易凭证号",type = "varchar(64)", defaultValue = "NULL")
    private String alipayNo;
    /**
     * 交易名称
     */
    @Column(name = "subject")
    @SailColumn(comment = "交易名称",type = "varchar(128)", defaultValue = "NULL")
    private String subject;
    /**
     * 交易状态
     */
    @Column(name = "trade_status")
    @SailColumn(comment = "交易状态",type = "varchar(32)", defaultValue = "NULL")
    private String tradeStatus;
    /**
     * 交易金额
     */
    @Column(name = "total_amount")
    @SailColumn(comment = "交易金额",type = "decimal(10,2)", defaultValue = "NULL")
    private BigDecimal totalAmount;
    /**
     * 买家在支付宝的唯一ID
     */
    @Column(name = "buyer")
    @SailColumn(comment = "买家在支付宝的唯一ID",type = "varchar(64)", defaultValue = "NULL")
    private String buyer;
    /**
     * 买家付款时间
     */
    @Column(name = "gmt_payment")
    @SailColumn(comment = "买家付款时间",type = "datetime", defaultValue = "NULL")
    private Date gmtPayment;
    /**
     * 买家付款金额
     */
    @Column(name = "buyer_pay_amount")
    @SailColumn(comment = "买家付款金额",type = "decimal(10,2)", defaultValue = "NULL")
    private BigDecimal buyerPayAmount;
    /**
     * 支付时间
     */
    @Column(name = "pay_time")
    @SailColumn(comment = "支付时间",type = "datetime", defaultValue = "NULL")
    private Date payTime;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_time")
    @SailColumn(comment = "创建时间",type = "datetime", defaultValue = "CURRENT_TIMESTAMP")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Column(name = "update_time")
    @SailColumn(comment = "更新时间",type = "datetime", defaultValue = "CURRENT_TIMESTAMP")
    private Date updateTime;
}
